﻿<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8" />
    <title>获取年份</title>
</head>
<body>

</body>
</html>

<script type="text/javascript">
	// console.log(new Date(1984, 10, 25).getFullYear().toString().substr(-2));

	//console.log(new Date(1984, 10, 25));
	//console.log(new Date(1984, 10, 25).getMonth());

	let _d = new Date();
	let _y = _d.getFullYear().toString().substr(-2);
	let _m = ("0" + (_d.getMonth() + 1).toString()).substr(-2);
	let prefix = _y + _m;

	console.log(prefix);
</script>